<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>用户列表-会员用户列表</title>
        <link href="/zhenze/Public/admin/css/style.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="/zhenze/Public/admin/js/jquery.js"></script>
        <script type="text/javascript" src="/zhenze/Public/My97DatePicker/WdatePicker.js"></script>

        <link href="/zhenze/Public/admin/css/select.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="/zhenze/Public/admin/js/jquery.idTabs.min.js"></script>
        <script type="text/javascript" src="/zhenze/Public/admin/js/select-ui.min.js"></script>

        <script type="text/javascript">
            $(document).ready(function (e) {
                $("#groupid").uedSelect({
                    width: 150
                });
            });
        </script>
    </head>

    <body>

        <div class="place">
            <span>位置：</span>
            <ul class="placeul">
                <li><a href="<?php echo U('index/welcome');?>">首页</a></li>
                <li><a href="###">会员用户列表</a></li>
            </ul>
        </div>

        <div class="formbody"> 
            <form name="seachform" id="seachform" action="<?php echo U('user/vip');?>" method="post">
                <ul class="seachform">
                    <li><label>用户名</label><input name="nickname"  value="<?=I('nickname')?>" type="text" class="scinput" /></li> 
                    <li>
                        <select id="groupid" name="group">
                            <option value="">选择分组</option> 
                            <?php foreach(D('user')->get_group() AS $k=>$v):?>
                            <option value="<?php echo ($k); ?>" <?php if(I('group')==$k):?>selected<?php endif;?>/><?= $v?></option> 
                            <?php endforeach;?>
                        </select> 

                    </li>					
                    <li><label></label><input placeholder="起始时间" name="start_time" id="starttime" class="scinput" type="text" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd'})" datatype="*" errormsg="时间范围开始值不能为空！" maxlength="20" style="width: 170px;" readonly value="<?=I('start_time')?>" /></li>
                    <li><label></label><input placeholder="截止时间" name="end_time" id="endtime" class="scinput" type="text" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd'})" datatype="*" errormsg="时间范围结束值范围不能为空！" maxlength="20" style="width: 170px;" readonly value="<?=I('end_time')?>" /></li>
                    <li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="查询"/></li>
                </ul>
            </form>

            <table class="tablelist">
                <thead>
                    <tr> 
                        <th>头像</th>
                        <th>分组</th>
                        <th>用户名</th>
                        <th>微信openID</th>
						<th>性别</th>
						<th>余额/佣金合计</th>
						<th>佣金比例</th>
                        <th>添加时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <?php if(is_array($dataList)): $i = 0; $__LIST__ = $dataList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$value): $mod = ($i % 2 );++$i;?><tr>
                            <td><img style="width:50px;height: 50px;border-radius: 25px;" src="<?= $value['avatar']?>" alt="<?= $value['nickname']?>" /></td>
                            <td><?php echo ($get_group[$value['groupid']]); ?></td>
                            <td><?= $value['nickname']?>(<?= $value['mobile']?>)</td>
                            <td><?= $value['openid']?></td> 
							<td><?= $value['sex']?></td> 
							<td><?= $value['money']?>/<?= $value['money_all']?></td>
							<td>卡:<?= $value['card_rate']?>/充值:<?= $value['topup_money']?>/流量:<?= $value['topup_data']?></td>
                            <td><?= date('Y-m-d H:i:s',$value['addtime'])?></td>
                            <td>
                                <a href="<?php echo U('user/usergroup',array('user_id'=>$value['user_id']));?>" class="tablelink">设置分组</a>
								<a href="<?php echo U('user/userrate',array('user_id'=>$value['user_id']));?>" class="tablelink">设置佣金比例</a>
                            </td>
                        </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                </tbody>
            </table>

            <?php echo ($pageshow); ?>

        </div>
        <script type="text/javascript">
            $('.tablelist tbody tr:odd').addClass('odd');
        </script>
    </body>

</html>